//
//  PokeInfoView.swift
//  ToDo
//
//  Created by yanhangpu on 2021/7/22.
//

import SwiftUI

struct PokeInfoView: View {

    var item: PokeMasterItem

    var body: some View {
        HStack {
            Image(item.roleInfo.imageName)
                .modifier(LeadingModifier())
            Spacer()
            VStack {
                
                Text(item.roleInfo.nickName)
                    .fontWeight(.bold)
                    .font(.system(size: 30))
                    .foregroundColor(.white)
                    .modifier(TrailingModifier())

                Text(item.roleId)
                    .fontWeight(.bold)
                    .font(.system(size: 25))
                    .foregroundColor(.white)
                    .modifier(TrailingModifier())
            }
        }
    }
}

struct PokeInfoView_Previews: PreviewProvider {
    static var previews: some View {
        let pokeMasterData: [PokeMasterItem] = PokeMasterModel.loadPokeMasterData()
        PokeInfoView(item: pokeMasterData[0])
    }
}
